# Maintainer: Ray Donnelly <mingw.android@gmail.com>
# Based on Arch Linux package maintained by : Balló György <ballogyor+arch at gmail dot com>

_realname=d-feet

pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.3.8
pkgrel=2
pkgdesc="D-Bus debugger for GNOME (mingw-w64)"
arch=('any')
url="https://wiki.gnome.org/Apps/DFeet"
license=('GPL')
depends=("${MINGW_PACKAGE_PREFIX}-gtk3" "${MINGW_PACKAGE_PREFIX}-python3-gobject" "${MINGW_PACKAGE_PREFIX}-hicolor-icon-theme")
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools" "intltool" "itstool")
install=d-feet-${CARCH}.install
source=(http://ftp.gnome.org/pub/GNOME/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz)
sha256sums=('e8423feb18fdff9b1465bf8442b78994ba13c12f8fa3b08e6a2f05768b4feee5')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  [ -d build-${CARCH} ] && rm -rf build-${CARCH}
  mkdir build-${CARCH}
  cd build-${CARCH}
  PYTHON=${MINGW_PREFIX}/bin/python3 \
  ../configure --prefix=${MINGW_PREFIX} \
               --sysconfdir="${pkgdir}${MINGW_PREFIX}/etc" \
               --localstatedir="${pkgdir}${MINGW_PREFIX}/var" \
               --disable-tests
  make
}

check() {
  cd ${_realname}-${pkgver}
  # Needs X
  #make check
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}/build-${CARCH}"
  make DESTDIR="$pkgdir" install
}
